import { Body, Controller, Get, Post } from '@nestjs/common';
import { RolesService } from './roles.service';
import { Roles } from '../entities/roles.entity';

@Controller('roles')
export class RolesController {
  constructor(private rolesService: RolesService) {}

  @Post()
  create(@Body() roles: Roles): Promise<Roles> {
    return this.rolesService.create(roles);
  }

  @Get()
  findAll() {
    return this.rolesService.findAll();
  }
}
